from .base import BaseConfig
from utils import common


class BLEConfig(BaseConfig):
    def __init__(self, path):
        super().__init__(path)

    def get_prefix(self):
        return common.get_data_value(self.__config, "prefix") or "ESP32-"

    def is_debug(self):
        debug = common.get_data_value(self.__config, "debug")
        return debug == 1

    def get_interval(self):
        inteval = common.get_data_value(self.__config, "interval") or 5
        return inteval
